1. Field of the Invention
The present invention relates to a device and method for detecting types of universal serial bus (USB) cable, and in particular to a device and method for detecting types of USB cable by disposing a variable resistor in the detection circuit and controlling the variable resistor corresponding to a plurality of on-off states to reduce the error rate of the USB cable.
2. Description of the Related Art
In order to allow the AC/DC power supply to be used in a variety of terminal equipment, and reduce the number of cable use to achieve the effect of energy saving and carbon reduction, a new USB power delivery specification (USB PD Spec.) is adopted, in which the USB specification may supply power of maximum 100 watt, such that not only the convenience of mobile application of each device can be strengthened, but also the charging time of the device can be effectively reduced to improve the efficiency by a larger current.
In USB PD Spec., a source end (provider) and a receiving end (consumer) are defined. Both sides must decide the actual transmitted voltage value and current value through data communication. The process thereof includes determining whether the inserted cable connector plug supports USB PD specification and confirming the transmitted electrical voltage value and current value through the data communication by both the source end and the receiving end.
Taking USB PD Standard-A connector plug as an example, in order to identify whether the USB PD specification is conformed, “PD Detect” pins are designed to be added in the USB PD Standard-A receptacle. By detecting the contacts between the pins of the receptacle and the USB plugs, the connected cable is determined if it supports the USB PD specifications or not. For detecting USB PD Standard-B plug. “ID” pin is added in the USB PD Standard-B receptacle, such that the connected cable can be determined if it supports the USB PD specifications. In addition, according to the location of the built-in capacitors, the current capabilities of the connected plug is determined, such as the current of 3 A or 5 A. In order to identify the different types of connected plugs, different resistors and capacitors are connected in series between the VBUS line and the ID line and between the ID line and the GND line.
Furthermore, when the capabilities the current of the connected cable is determined, the detection steps are required for the connected plug. The detection circuits and methods are designed by USB-IF to determine the capabilities of the current of USB cable. In the process of detection, a signal is provided by the signal source. By detecting the signal at the receiving end under different states of the switches of the detection circuit, the types of connected plug may be determined based on the returned signal.
However, in the process of determination described above, the signal is substantially attenuated by the parasitic capacitor on the ID line. The generation of parasitic capacitors on the ID line are caused by the following reasons: the parasitic capacitors on the ID soldering pad, generated by the wires between the ID soldering pad and the receptacle on the printed circuit board (PCB), caused by the guiding holes on the PCB, introduced by the connected plug, and caused by the general purpose input/output (GPIO) interface usually connected to the ID end, etc. The errors are generated by all the parasitic capacitors mentioned above during the detection steps. Thus, the determination of the types of connected plug are tend to fail.